updated
authorHans Breuer <hans@breuer.org>
Sat, 10 Mar 2001 18:13:03 +0000 (18:13 +0000)
committerHans Breuer <hans@src.gnome.org>
Sat, 10 Mar 2001 18:13:03 +0000 (18:13 +0000)
2001-03-10  Hans Breuer  <hans@breuer.org>

* gdk/gdk.def : updated

* gdk/win32/gdkgc-win32.c : pixmaps are visible again, due
to offseting the clip_mask at the right place

* gdk/win32/gdkwindow-win32.c : don't create background brushes
for all the gdkClasses, especially not for the input_only case.
Otherwise flickering wont be avoidable, because we don't get
WM_ERASEBKGND message for these windows.

* gdk/win32/gdkevents-win32.c : initialize event->expose.region
and fixed massive redraw problems apparently triggered by Alexanders
recent change. Not fully understood the GDK_EXPOSE / WM_PAINT handling
but it seems to work quite well :-)

* gdk/win32/gdkprivate-win32.h : added _gdk_window_process_expose
prototype

12 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/gdk.def
gdk/win32/gdkevents-win32.c
gdk/win32/gdkgc-win32.c
gdk/win32/gdkprivate-win32.h
gdk/win32/gdkwindow-win32.c

index c77fae7948579b185852d495c147ae2b052d2fdd..bfdb07b069bb78cd61187f8f47baa80fadabc666 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2001-03-10  Hans Breuer  <hans@breuer.org>
+
+       * gdk/gdk.def : updated
+
+       * gdk/win32/gdkgc-win32.c : pixmaps are visible again, due
+       to offseting the clip_mask at the right place
+
+       * gdk/win32/gdkwindow-win32.c : don't create background brushes
+       for all the gdkClasses, especially not for the input_only case.
+       Otherwise flickering wont be avoidable, because we don't get
+       WM_ERASEBKGND message for these windows.
+
+       * gdk/win32/gdkevents-win32.c : initialize event->expose.region
+       and fixed massive redraw problems apparently triggered by Alexanders 
+       recent change. Not fully understood the GDK_EXPOSE / WM_PAINT handling
+       but it seems to work quite well :-)
+
+       * gdk/win32/gdkprivate-win32.h : added _gdk_window_process_expose
+       prototype
+
 Sat Mar 10 12:15:31 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreestore.c (gtk_tree_store_set_cell): Fix a stupid typo.
index c77fae7948579b185852d495c147ae2b052d2fdd..bfdb07b069bb78cd61187f8f47baa80fadabc666 100644 (file)
@@ -1,3 +1,23 @@
+2001-03-10  Hans Breuer  <hans@breuer.org>
+
+       * gdk/gdk.def : updated
+
+       * gdk/win32/gdkgc-win32.c : pixmaps are visible again, due
+       to offseting the clip_mask at the right place
+
+       * gdk/win32/gdkwindow-win32.c : don't create background brushes
+       for all the gdkClasses, especially not for the input_only case.
+       Otherwise flickering wont be avoidable, because we don't get
+       WM_ERASEBKGND message for these windows.
+
+       * gdk/win32/gdkevents-win32.c : initialize event->expose.region
+       and fixed massive redraw problems apparently triggered by Alexanders 
+       recent change. Not fully understood the GDK_EXPOSE / WM_PAINT handling
+       but it seems to work quite well :-)
+
+       * gdk/win32/gdkprivate-win32.h : added _gdk_window_process_expose
+       prototype
+
 Sat Mar 10 12:15:31 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreestore.c (gtk_tree_store_set_cell): Fix a stupid typo.
index c77fae7948579b185852d495c147ae2b052d2fdd..bfdb07b069bb78cd61187f8f47baa80fadabc666 100644 (file)
@@ -1,3 +1,23 @@
+2001-03-10  Hans Breuer  <hans@breuer.org>
+
+       * gdk/gdk.def : updated
+
+       * gdk/win32/gdkgc-win32.c : pixmaps are visible again, due
+       to offseting the clip_mask at the right place
+
+       * gdk/win32/gdkwindow-win32.c : don't create background brushes
+       for all the gdkClasses, especially not for the input_only case.
+       Otherwise flickering wont be avoidable, because we don't get
+       WM_ERASEBKGND message for these windows.
+
+       * gdk/win32/gdkevents-win32.c : initialize event->expose.region
+       and fixed massive redraw problems apparently triggered by Alexanders 
+       recent change. Not fully understood the GDK_EXPOSE / WM_PAINT handling
+       but it seems to work quite well :-)
+
+       * gdk/win32/gdkprivate-win32.h : added _gdk_window_process_expose
+       prototype
+
 Sat Mar 10 12:15:31 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreestore.c (gtk_tree_store_set_cell): Fix a stupid typo.
index c77fae7948579b185852d495c147ae2b052d2fdd..bfdb07b069bb78cd61187f8f47baa80fadabc666 100644 (file)
@@ -1,3 +1,23 @@
+2001-03-10  Hans Breuer  <hans@breuer.org>
+
+       * gdk/gdk.def : updated
+
+       * gdk/win32/gdkgc-win32.c : pixmaps are visible again, due
+       to offseting the clip_mask at the right place
+
+       * gdk/win32/gdkwindow-win32.c : don't create background brushes
+       for all the gdkClasses, especially not for the input_only case.
+       Otherwise flickering wont be avoidable, because we don't get
+       WM_ERASEBKGND message for these windows.
+
+       * gdk/win32/gdkevents-win32.c : initialize event->expose.region
+       and fixed massive redraw problems apparently triggered by Alexanders 
+       recent change. Not fully understood the GDK_EXPOSE / WM_PAINT handling
+       but it seems to work quite well :-)
+
+       * gdk/win32/gdkprivate-win32.h : added _gdk_window_process_expose
+       prototype
+
 Sat Mar 10 12:15:31 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreestore.c (gtk_tree_store_set_cell): Fix a stupid typo.
index c77fae7948579b185852d495c147ae2b052d2fdd..bfdb07b069bb78cd61187f8f47baa80fadabc666 100644 (file)
@@ -1,3 +1,23 @@
+2001-03-10  Hans Breuer  <hans@breuer.org>
+
+       * gdk/gdk.def : updated
+
+       * gdk/win32/gdkgc-win32.c : pixmaps are visible again, due
+       to offseting the clip_mask at the right place
+
+       * gdk/win32/gdkwindow-win32.c : don't create background brushes
+       for all the gdkClasses, especially not for the input_only case.
+       Otherwise flickering wont be avoidable, because we don't get
+       WM_ERASEBKGND message for these windows.
+
+       * gdk/win32/gdkevents-win32.c : initialize event->expose.region
+       and fixed massive redraw problems apparently triggered by Alexanders 
+       recent change. Not fully understood the GDK_EXPOSE / WM_PAINT handling
+       but it seems to work quite well :-)
+
+       * gdk/win32/gdkprivate-win32.h : added _gdk_window_process_expose
+       prototype
+
 Sat Mar 10 12:15:31 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreestore.c (gtk_tree_store_set_cell): Fix a stupid typo.
index c77fae7948579b185852d495c147ae2b052d2fdd..bfdb07b069bb78cd61187f8f47baa80fadabc666 100644 (file)
@@ -1,3 +1,23 @@
+2001-03-10  Hans Breuer  <hans@breuer.org>
+
+       * gdk/gdk.def : updated
+
+       * gdk/win32/gdkgc-win32.c : pixmaps are visible again, due
+       to offseting the clip_mask at the right place
+
+       * gdk/win32/gdkwindow-win32.c : don't create background brushes
+       for all the gdkClasses, especially not for the input_only case.
+       Otherwise flickering wont be avoidable, because we don't get
+       WM_ERASEBKGND message for these windows.
+
+       * gdk/win32/gdkevents-win32.c : initialize event->expose.region
+       and fixed massive redraw problems apparently triggered by Alexanders 
+       recent change. Not fully understood the GDK_EXPOSE / WM_PAINT handling
+       but it seems to work quite well :-)
+
+       * gdk/win32/gdkprivate-win32.h : added _gdk_window_process_expose
+       prototype
+
 Sat Mar 10 12:15:31 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreestore.c (gtk_tree_store_set_cell): Fix a stupid typo.
index c77fae7948579b185852d495c147ae2b052d2fdd..bfdb07b069bb78cd61187f8f47baa80fadabc666 100644 (file)
@@ -1,3 +1,23 @@
+2001-03-10  Hans Breuer  <hans@breuer.org>
+
+       * gdk/gdk.def : updated
+
+       * gdk/win32/gdkgc-win32.c : pixmaps are visible again, due
+       to offseting the clip_mask at the right place
+
+       * gdk/win32/gdkwindow-win32.c : don't create background brushes
+       for all the gdkClasses, especially not for the input_only case.
+       Otherwise flickering wont be avoidable, because we don't get
+       WM_ERASEBKGND message for these windows.
+
+       * gdk/win32/gdkevents-win32.c : initialize event->expose.region
+       and fixed massive redraw problems apparently triggered by Alexanders 
+       recent change. Not fully understood the GDK_EXPOSE / WM_PAINT handling
+       but it seems to work quite well :-)
+
+       * gdk/win32/gdkprivate-win32.h : added _gdk_window_process_expose
+       prototype
+
 Sat Mar 10 12:15:31 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreestore.c (gtk_tree_store_set_cell): Fix a stupid typo.
index b8872efa4dbe7273bd9fa13eccf89908bc125442..b17f5a3cb28cf25b4e02df7bb948fe25fd6e2f9b 100644 (file)
@@ -159,21 +159,6 @@ EXPORTS
        gdk_get_display
        gdk_get_show_events
        gdk_get_use_xshm
-       gdk_ic_attr_destroy
-       gdk_ic_attr_new
-       gdk_ic_destroy
-       gdk_ic_get_attr
-       gdk_ic_get_events
-       gdk_ic_get_style
-       gdk_ic_get_values
-       gdk_ic_new
-       gdk_ic_set_attr
-       gdk_ic_set_values
-       gdk_im_begin
-       gdk_im_decide_style
-       gdk_im_end
-       gdk_im_ready
-       gdk_im_set_best_style
        gdk_image_get
        gdk_image_get_pixel
        gdk_image_get_type
@@ -320,6 +305,7 @@ EXPORTS
        gdk_window_add_filter
        gdk_window_at_pointer
        gdk_window_begin_paint_rect
+       gdk_window_begin_paint_region
        gdk_window_clear
        gdk_window_clear_area
        gdk_window_clear_area_e
index 10fdb81960a0405bbea5d5b7bc8e0bd9e6c7bb24..6973226c2b524e2f8d8b3395dfd6914e2d5d1bd6 100644 (file)
@@ -96,7 +96,8 @@ static GdkFilterReturn
 static gboolean  gdk_event_translate   (GdkEvent *event, 
                                         MSG      *msg,
                                         gboolean *ret_val_flagp,
-                                        gint     *ret_valp);
+                                        gint     *ret_valp,
+                                        gboolean  return_exposes);
 
 static gboolean gdk_event_prepare  (GSource     *source,
                                    gint        *timeout);
@@ -172,7 +173,7 @@ real_window_procedure (HWND   hwnd,
   msg.pt.y = HIWORD (pos);
 
   event.flags = GDK_EVENT_PENDING;
-  if (gdk_event_translate (&event.event, &msg, &ret_val_flag, &ret_val))
+  if (gdk_event_translate (&event.event, &msg, &ret_val_flag, &ret_val, FALSE))
     {
       event.flags &= ~GDK_EVENT_PENDING;
 #if 1
@@ -417,7 +418,7 @@ gdk_event_get_graphics_expose (GdkWindow *window)
     {
       event = gdk_event_new ();
       
-      if (gdk_event_translate (event, &msg, NULL, NULL))
+      if (gdk_event_translate (event, &msg, NULL, NULL, TRUE))
        return event;
       else
        gdk_event_free (event);
@@ -1596,7 +1597,8 @@ static gboolean
 gdk_event_translate (GdkEvent *event,
                     MSG      *msg,
                     gboolean *ret_val_flagp,
-                    gint     *ret_valp)
+                    gint     *ret_valp,
+                    gboolean  return_exposes)
 {
   DWORD pidActWin;
   DWORD pidThis;
@@ -2764,28 +2766,45 @@ gdk_event_translate (GdkEvent *event,
           || (paintstruct.rcPaint.bottom == paintstruct.rcPaint.top))
         break;
 
-      event->expose.type = GDK_EXPOSE;
-      event->expose.window = window;
-      event->expose.area.x = paintstruct.rcPaint.left;
-      event->expose.area.y = paintstruct.rcPaint.top;
-      event->expose.area.width = paintstruct.rcPaint.right - paintstruct.rcPaint.left;
-      event->expose.area.height = paintstruct.rcPaint.bottom - paintstruct.rcPaint.top;
-      event->expose.count = 0;
+      if (return_exposes)
+        {
+          event->expose.type = GDK_EXPOSE;
+          event->expose.window = window;
+          event->expose.area.x = paintstruct.rcPaint.left;
+          event->expose.area.y = paintstruct.rcPaint.top;
+          event->expose.area.width = paintstruct.rcPaint.right - paintstruct.rcPaint.left;
+          event->expose.area.height = paintstruct.rcPaint.bottom - paintstruct.rcPaint.top;
+          event->expose.region = gdk_region_rectangle (&(event->expose.area));
+          event->expose.count = 0;
+
+          return_val = !GDK_WINDOW_DESTROYED (window);
+          if (return_val)
+            {
+              GList *list = gdk_queued_events;
+              while (list != NULL )
+                {
+                  if ((((GdkEvent *)list->data)->any.type == GDK_EXPOSE) &&
+                       (((GdkEvent *)list->data)->any.window == window) &&
+                       !(((GdkEventPrivate *)list->data)->flags & GDK_EVENT_PENDING))
+                       ((GdkEvent *)list->data)->expose.count++;
+
+                    list = list->next;
+                }
+            }
+        }
+      else
+        {
+          GdkRectangle expose_rect;
 
-      return_val = !GDK_WINDOW_DESTROYED (window);
-      if (return_val)
-       {
-         GList *list = gdk_queued_events;
-         while (list != NULL )
-           {
-             if ((((GdkEvent *)list->data)->any.type == GDK_EXPOSE) &&
-                 (((GdkEvent *)list->data)->any.window == window) &&
-                 !(((GdkEventPrivate *)list->data)->flags & GDK_EVENT_PENDING))
-               ((GdkEvent *)list->data)->expose.count++;
-             
-             list = list->next;
-           }
-       }
+          expose_rect.x = paintstruct.rcPaint.left;
+          expose_rect.y = paintstruct.rcPaint.top;
+          expose_rect.width = paintstruct.rcPaint.right - paintstruct.rcPaint.left;
+          expose_rect.height = paintstruct.rcPaint.bottom - paintstruct.rcPaint.top;
+
+           _gdk_window_process_expose (window, GetMessageTime (), &expose_rect);
+
+           return_val = FALSE;
+        }
       break;
 
     case WM_SETCURSOR:
index 787cc68c0e6f9e0115d41de51c4b8b535cc9271b..a51ef61c361856eeac3a96085c8cf27c6f53785e 100644 (file)
@@ -338,9 +338,6 @@ gdk_win32_gc_values_to_win32values (GdkGCValues    *values,
          win32_gc->hcliprgn =
            BitmapToRegion ((HBITMAP) GDK_PIXMAP_HBITMAP (values->clip_mask));
          win32_gc->values_mask |= GDK_GC_CLIP_MASK;
-         OffsetRgn (win32_gc->hcliprgn,
-                    win32_gc->parent_instance.clip_x_origin,
-                    win32_gc->parent_instance.clip_y_origin);
        }
       else
        {
@@ -385,8 +382,8 @@ gdk_win32_gc_values_to_win32values (GdkGCValues    *values,
       win32_gc->values_mask |= GDK_GC_CLIP_Y_ORIGIN;
       GDK_NOTE (MISC, (g_print ("%sclip_y=%d", s, values->clip_y_origin),
                       s = ","));
-   }
+    }
+
   if (mask & GDK_GC_EXPOSURES)
     {
       win32_gc->graphics_exposures = values->graphics_exposures;
@@ -1082,6 +1079,10 @@ gdk_win32_hdc_get (GdkDrawable    *drawable,
     {
       if (SelectClipRgn (win32_gc->hdc, win32_gc->hcliprgn) == ERROR)
        WIN32_API_FAILED ("SelectClipRgn"), ok = FALSE;
+      if (ok && !OffsetClipRgn (win32_gc->hdc,
+                win32_gc->values_mask & GDK_GC_CLIP_X_ORIGIN ? gc->clip_x_origin : 0,
+                win32_gc->values_mask & GDK_GC_CLIP_Y_ORIGIN ? gc->clip_y_origin : 0))
+       WIN32_API_FAILED ("OffsetClipRgn"), ok = FALSE;
     }
 
   if (gdk_debug_flags & GDK_DEBUG_MISC)
index 7f865b11101fc6ba51d1cf90c159120ecf9d30a8..e436695640205893622fe031a74b86da2d542dc4 100644 (file)
@@ -39,6 +39,9 @@ _gdk_window_move_resize_child (GdkWindow *window,
                               gint       y,
                               gint       width,
                               gint       height);
+void _gdk_window_process_expose    (GdkWindow     *window,
+                                    gulong         serial,
+                                    GdkRectangle  *area);
 
 void gdk_win32_selection_init (void);
 void gdk_win32_dnd_exit (void);
index d052333cf783acd1f427201ebe91fc2edccc42c9..3ffcc8f882f490e72eafce591a1fb39920fec2d0 100644 (file)
@@ -329,10 +329,15 @@ RegisterGdkClass (GdkWindowType wtype)
   wcl.hIconSm = 0;
 
   /* initialize once per class */
+  /*
+   * HB: Setting the background brush leads to flicker, because we
+   * don't get asked how to clear the background. This is not what
+   * we want, at least not for input_only windows ...
+   */
 #define ONCE_PER_CLASS() \
   wcl.hIcon = CopyIcon (hAppIcon); \
   wcl.hIconSm = CopyIcon (hAppIcon); \
-  wcl.hbrBackground = CreateSolidBrush (RGB (0,0,0)); \
+  wcl.hbrBackground = NULL; /* CreateSolidBrush (RGB (0,0,0)); */ \
   wcl.hCursor = LoadCursor (NULL, IDC_ARROW); 
   
   switch (wtype)